This application claims the priority of Japanese Patent Application No. 2000-29839 filed Feb. 7, 2000, and Japanese Patent Application No. 2000-29840 filed Feb. 7, 2000.
1. Field of the Invention
The present invention relates to an electric mask generating apparatus of an electronic endoscope, in particular, to mask generation processing for forming an image signal, to which a mask is attached by using mask generation memory, in short time.
2. Description of the Prior Art
An electronic endoscopic apparatus images an object with an image pickup device that is located in an end part of a scope (an electronic endoscope) such as a CCD (Charge Coupled Device), and performs predetermined image processing of a video signal obtained by this CCD. Owing to this, the object image is displayed on a monitor. On this monitor screen, an electric mask is given to a perimeter of the screen, and the above-described object image is displayed on, for example, a circular opening section set in this electric mask.
In FIG. 9, a circuit of an electric mask-generating section of an electronic endoscope is shown. In this mask-generating section, a mask signal having a predetermined mask shape is written in a mask generation memory 1, and this mask signal is mixed in a video signal of the object in a mask-mixing circuit 2. For example, the video signal inputted into this mask-mixing circuit 2 is made to be R (red), G (green), and B (blue) signals formed from outputs of the above-described CCD, and the mask signal is mixed and given to these R, G, and B signals.
FIGS. 10(A) to 10(D) show mixing processing of the above-described electric mask signal. FIG. 10(A) shows an original image that is an image before masking and is inputted into the above-described mask-mixing circuit 2, and this becomes an image that an object image F is displayed with a body tube frame 3 on a screen 4. In this image, not only small irregularity portions of the body tube frame 3 are displayed, but also a vignetting portion in its perimeter occurs. On the other hand, as shown in FIG. 10(B), by a mask (image) M1, which covers the perimeter of the image and has a circular opening section, being formed on the basis of the mask signal in the above-described mask generation memory 1, and by the signals in FIG. 10(A) and FIG. 10(B) being mixed in the above-described mask-mixing circuit 2, as shown in FIG. 10(C), a screen 4 that is easy to be watched and in which the body tube frame 3 and the vignetting portion are covered is formed.
However, the above-described electric mask generation processing has a problem that about 9.7 frames (more than one second in time) are required in mask generation. The present applicant proposes forming one piece of mask image by, for example, storing quarter data M1a, which is a quarter of the mask M1 as shown by dotted lines shown in FIG. 7, in the mask generation memory 1 shown in FIG. 9, and reading this mask data M1a four times sequentially by changing a read direction. Nevertheless, conventionally, as shown in FIG. 5(D) showing a part of the mask enlarged, one pixel P of the mask image M1 is expressed in one byte of data.
Here, time for writing the quarter data M1a in the above-described mask generation memory 1 will be calculated. For example, it is assumed that horizontal pixels are 768 and vertical lines are 525 in the NTSC system, a clock frequency of a microcomputer is 10 MHz, and the microcomputer can process one instruction per clock. Then, according to a flowchart of memory write operation in FIG. 8, each necessary clock number (steps S0 to S8) will be multiplied. Time T to be necessary for write becomes T=({fraction (1/10)}7)xc3x97({fraction (768/2)})xc3x97({fraction (525/2)})xc3x978+({fraction (1/107)}) ≈0.08064 [sec]. Since time for generating one screen is four times larger that the above-described time T, the time becomes 0.08064xc3x974=0.32256 [sec]. In addition, in case of this NTSC system, display needs {fraction (1/30)} sec per frame, and hence a frame number necessary in mask generation becomes 0.32256/({fraction (1/30)})=9.6768 [frames].
The write time T of the above-described data M1a is the time that becomes necessary in initial processing of image formation (at the time of power-on). Nevertheless, since quick image display cannot be performed because of necessity of about 9.7 frames in order to form one screen, it is expected to reduce the initial processing time including the write time of mask data.
In addition, conventional electric mask processing has a problem that, when an image is magnified, a necessary image may not be displayed by a mask. That is, a recent electronic endoscope has an optical zoom function for optically magnifying and imaging an object, and an electronic zoom function for electronically magnifying the image after image pickup. For example, as shown in the screen 4 shown in FIG. 11(A), if there is a concerned location Q in the image normally displayed, it occurs in the image that is magnified, displayed, and shown in FIG. 11(B) that apart of the concerned location Q is covered by the mask M1.
Then, in the present application, it is proposed to magnify or reduce a mask according to an image magnified or reduced (scaling). Never the less, even in this case, there is a problem that the switching of magnification and reduction of the mask at the time of scaling operation is not performed smoothly.
The present invention has been achieved in consideration of the above-described problems, and its object is to provide an electric mask generating apparatus of an electronic endoscope that can shorten the time necessary for generation processing of a mask attached to a normal image or a magnified image, and can quickly display an object image to which the mask is attached.
In order to attain the above-described objects, an electric mask generating apparatus of an electronic endoscope according to the present invention generates an electric mask to cover a predetermined portion of a screen, and is characterized by including: a mask-generating circuit forming a mask signal expressing one pixel in one bit of information; mask generation memory storing the mask signal in one pixel per bit that is formed in this mask-generating circuit; and a mask-mixing circuit mixing the mask signal, which is read from this mask generation memory, with an image signal obtained with a solid-state image sensor.
According to this invention, on the basis of mask generation data stored in, for example, a control memory, a mask signal (image signal) having the configuration of one pixel per bit is generated by a microcomputer or the like, and this mask signal is once written in the mask generation memory. Therefore, writing time into this mask generation memory is shortened in one-eighth of the conventional writing time at which one pixel is written in one byte. After that, this mask signal having the configuration of one pixel per bit is mixed with the original image signal, which is formed with using a solid-state image sensor, by using a shift register or the like, and is outputted to a monitor or the like.
In addition, another invention is characterized by including: a scaling mask-generating circuit that performs mask scaling processing for an electric mask, covering a predetermined portion of a screen, according to image scaling of the electronic endoscopic apparatus having an image scaling function, and forms a mask signal in which one pixel is expressed in one bit of information; mask generation memory storing a scaling mask signal that has the configuration of one pixel per bit and is formed by this scaling mask-generating circuit; and a mask-mixing circuit mixing the scaling mask signal, which is read from this mask generation memory, with an image signal obtained with a solid-state image sensor.
According to this invention, when magnifying or reducing operation is performed by a scaling switch, a mask itself is also scaled. Thus, mask generation data according to a magnification rate is read by a microcomputer or the like, a mask signal (image signal), in which one pixel is expressed in one bit of information, is generated on the basis of this data, and this mask signal is once written in the mask generation memory. After that, by mixing this mask signal, having the configuration of one pixel per bit, with an original image signal, formed by using a solid-state image sensor, by using a shift register or the like, and outputting the signal, a new magnified image is displayed by the mask magnified (a mask whose opening section is enlarged) in a monitor. Since the writing time into memory in this case also is remarkably shortened and hence a mask is formed in short time, masks, which are switched at the time of scaling, are displayed smoothly.
In addition, it is possible to form an entire mask signal by storing a quarter or a half mask signal of the entire mask signal in the above-described mask generation memory, and reading the signal in this memory by changing a read direction.
Moreover, the above-described mask-generating circuit can be configured by first memory storing bit string generation data of an electric mask, which has the configuration of one pixel per one bit, with a program, and random access memory for developing the bit string generation data in this first memory.